This page last changed on Apr 10, 2007 by jdeolive.

Details the process of setting up GeoServer to run via the Apache HTTP Server. Contributed by John Roberts.

Apache Installation
Tomcat Installation
Connecting Tomcat and Apache
GeoServer

Apache Installation

  1. Download the Apache Windows Installer from Apache
  2. Run the installer. More information about installing Apache on Windows can be found here.
  3. Verify that Apache is running by visiting http://localhost in your web browser.

Starting and Stopping the Apache Service

Method 1: Services Dialog

The Apache service can be accessed from Administrative Tools -> Services under the Start menu.

The Apache service is titled "Apache2" and can be controlled from the dialog.

Method 2: Command Line

The following commands can be used from a command prompt to control the Apache service.

Starting:

>httpd -n "Apache2" -k start

Stopping:

>httpd -n "Apache2" -k stop

Restarting:

>httpd -n "Apache2" -k restart

Tomcat Installation

  1. Install a Java Development Kit from Sun available herehttp://java.sun.com/javase/downloads/index_jdk5.jsp]
  2. Ensure the JAVA_HOME environment variable is set to the root of the JDK installation.
  3. Download the Tomcat Windows Installer from Apache
  4. Run the installer.
  5. Verify that Tomcat is running by visiting http://localhost:8080 in your web browser.

Starting and Stopping the Tomcat Service

The Tomcat service is titled "Apache Tomcat" and can be controlled from the Services dialog.

Connecting Tomcat and Apache

  1. Download the Tomcat Connnector from Apache
  2. Rename mod_jk-apache-2.2.4.so to mod_jk.so
  3. Copy mod_jk.so into the modules directory of your Apache installation. Example: C:\Program Files\Apache Software Foundation\Apache2.2\modules
  4. Edit the httpd.conf file located in the conf directory of your Apache installation. Example: C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf. Add the following lines to the end of the file
    httpd.conf
    # Load mod_jk module
    LoadModule jk_module modules/mod_jk.so
    # Where to find workers.properties
    JkWorkersFile conf/workers.properties
    # Where to put jk shared memory
    JkShmFile     logs/mod_jk.shm
    # Where to put jk logs
    JkLogFile     logs/mod_jk.log
    # Set the jk log level [debug/error/info]
    JkLogLevel    info
    # Select the timestamp log format
    JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
    # Send everything for context /geoserver to worker named worker1 (ajp13)
    JkMount  /geoserver* worker1
    # Send all .jsp files to worker1
    JkMount /*jsp worker1
  5. Create the file workers.properties in the conf directory of your Apache installation
    worker.properties
    # Define 1 real worker using ajp13
    worker.list=worker1
    # Set properties for worker1 (ajp13)
    worker.worker1.type=ajp13
    worker.worker1.host=localhost
    worker.worker1.port=8009
  6. Restart Apache
  7. Verify the connector is working by first copying webapps/ROOT/index.jsp into webapps/ROOT under the root of the Tomcat installation and then visiting http://localhost/index.jsp. If you see the following then you have successfully installed the connector.

GeoServer

  1. Grab the GeoServer war and copy it into the webapps directory under the root of the Tomcat installation. More detailed instructions available here.
  2. Verify everything is working by visiting http://localhost/geoserver. If you are greeted with the GeoServer welcome screen then you have successfully completed setup.

apacheService.png (image/png)
services.png (image/png)
installer.png (image/png)
modjk.png (image/png)
tomcatService.png (image/png)
tomcatInstaller.png (image/png)
indexjsp.png (image/png)
Document generated by Confluence on Jan 16, 2008 23:28